Skip to content

Copy a file from an HTTP location to the data store

Request

Requires nodes::service:datastore-manager permission.

Security
JWTAuthorizer
Path
nodeIDstringrequired

Node ID

Bodyapplication/json

Download config

algostring

Hashing algorithm of the file - MD5, SHA1, or SHA-256

Example:"MD5"
filenamestring

Target filename

Example:"file.iso"
hashstring

Hash of the file

Example:"07c43d77ab8d30cee094ce09b14f87fa"
locationstring

Target destination directory in data store

Example:"/isos"
uristring

URI of source file

Example:"http://example.com/file.iso"
curl -i -X POST \
  'https://apidocs.trustgrid.io/_mock/v2/node/{nodeID}/data-store/http-download' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "algo": "MD5",
    "filename": "file.iso",
    "hash": "07c43d77ab8d30cee094ce09b14f87fa",
    "location": "/isos",
    "uri": "http://example.com/file.iso"
  }'

Responses

OK